import openpyxl


class Readexcel:
    @staticmethod
    def read_excel( filename, sheet_name):
        wb = openpyxl.load_workbook(filename)
        ws = wb[sheet_name]
        # data = [[ws.cell(row=i, column=j) for j in range(1, ws.max_column + 1)] for i in
        #         range(2, 2001)]  # ,ws.max_row+1
        # return data
        data =[]
        for row in ws.iter_rows(min_row=2,max_row=2001,values_only=True):
            data.append(list(row))

        return data


if __name__ == '__main__':
# print(Readexcel.read_excel(r"D:\桌面\user.xlsx", "sheet01"))
    reader = Readexcel()
    result = reader.read_excel(r"D:\桌面\user.xlsx", "sheet01")
    print(result)
